package com.oracle.oa.dao.impl;


import java.util.ArrayList;
import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;

import com.oracle.oa.dao.AccessoryfileDao;
import com.oracle.oa.entity.Accessoryfile;
public class AccessoryfileDaoImpl extends BaseDaoImpl implements
		AccessoryfileDao {

	

	public Accessoryfile findAccfile(long fileid) {
		//this.openSession();
		Session session=this.getHibernateTemplate().getSessionFactory().openSession();
		Accessoryfile a=null;
		Criteria c=session.createCriteria(Accessoryfile.class);
		c.add(Restrictions.eq("fileinfo.fileid", fileid));
		a=(Accessoryfile) c.list().get(0);
		session.close();
		return a;
	}

	

}
